The background description provided herein is for the purpose of generally presenting the context of the disclosure. Unless otherwise indicated herein, the materials described in this section are not prior art to the claims in this application and are not admitted to be prior art by inclusion in this section.
Many computing device environments, for example, mobile devices, offer the ability to execute applications. In many devices, the device runs a particular operating system (“OS”) and execution environment and allows execution of applications that are made for that OS and environment. However, in some scenarios, users of these devices may wish to execute applications that were developed to execute in different environments and/or under differed OSes. For example, a user of a mobile phone executing under a version of the Android® OS may, in some circumstances, wish to execute a guest application that was not originally written to operate on an Android device, such as a Windows® application.
These guest applications may, in some scenarios, be executed within an emulator that allows the guest application to execute as if it were executing in its expected OS and environment. However, there may be difficulties experienced when attempting to allow the guest application to draw to a screen of the computing device. In various scenarios, because the guest application is not running under the host OS of the computing device, the computing device may find it difficult to obtain access to screen produced by the guest application in order to draw them on the device.
In some techniques, a memory copy scheme is used to get past these limitations. In many situations, the host OS may utilize two buffers, a front buffer and a back buffer, allow drawing of guest application frames on the back buffer, and switch between the two when the drawing of each frame is complete. However, the host OS may not know when drawing of a frame is complete, because the guest application is performing its drawing within an emulated environment (and does not necessarily know that the host operating system is waiting for a completed frame). Thus, the host OS may, in some scenarios, periodically poll the guest application to determine when a frame is complete. Upon such indication, the host OS may then perform a copy of the guest application's local drawing buffer to the host OS's back buffer, and then perform a buffer switch to allow the guest-application-drawn frame to appear on the screen of the computing device. However, while this technique may provide for the guest application to draw to the computing device screen, the polling and copying of drawing buffer memory introduce substantial processing costs that are undesirable.